package com.yunxi.poc.starbucks.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yunxi.poc.starbucks.entity.SaleitemWithReportcategory;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author shiyuan.xlc
 * @since 2021-08-17
 */
public interface SaleitemWithReportcategoryMapper extends BaseMapper<SaleitemWithReportcategory> {

    @Select("select distinct sale_item_code from saleitem_with_reportcategory ${ew.customSqlSegment}")
    List<String> saleItemCodes(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("select distinct category from saleitem_with_reportcategory ${ew.customSqlSegment}")
    List<String> categories(@Param(Constants.WRAPPER) Wrapper wrapper);
}
